import request from './request'
//获取当前用户信息
export const GetApi = ()=>request.get('/assetsAmmeter/list')

//登录操作
export function GetLoginApi(params){
    return request({
      url:'/sysUser/login',
      method :'post',
      params:params,
    })
  }
  
//注册操作
export function RegisterApi(params){
  return request({
    url:'/sysUser/register',
    method:'post',
    params:params
  })
}
//查询电表
export const GetElectricity = (params)=>request.get('/assetsAmmeter/query',{params})
//修改密码
export function GetReviseApi(params){
    return request({
      url:'/sysUser/editPassword',
      method :'post',
      params:params,
    })
  }
//电表多项添加
export function GetEAddApi(params){
  return request({
    url:'/assetsAmmeter/save',
    method:'post',
    params:params,
  })
}
//电表修改
export function GetEChangeApi(params){
  return request({
    url:'/assetsAmmeter/update',
    method:'post',
    params:params,
  })
}
//删除电表
export function GetEDelApi(params){
  return request({
    url:'/assetsAmmeter/delete',
    method:'post',
    params:params,
  })
}
//终端查询
export const AssetsTerminal = (params)=>request.get('/assetsTerminal/query',{params})
//终端删除
export function GetTDelApi(params){
  return request({
    url:'/assetsTerminal/delete',
    method:'post',
    params:params,
  })
}
//终端修改
export function GetTChangeApi(params){
  return request({
    url:'/assetsTerminal/update',
    method:'post',
    params:params,
  })
}
//终端添加
export function GetTAddApi(params){
  return request({
    url:'/assetsTerminal/save',
    method:'post',
    params:params,
  })
}
//客户查询
export const Customer = (params)=>request.get('/customer/query',{params})
//客户添加
export function CustomerAdd(params){
  return request({
    url:'/customer/save',
    method:'post',
    params:params
  })
}
//客户删除
export function CustomerDel(params){
  return request({
    url:'/customer/delete',
    method:'post',
    params:params
  })
}
//客户挂接查询
export const CustomerGua = (params)=>request.get('/customer/mountAmmeterList',{params})
//客户挂接电表
export function CustomerMount(params){
  return request({
    url:'/customer/mount',
    method:'post',
    params:params
  })
}

//采集信息查询
export const GatherApi = (params)=>request.get('/gather/query',{params})

//采集删除
export function GatherDel(params){
  return request({
    url:'/gather/delete',
    method:'post',
    params:params
  })
}
//采集新增
export function GatherAdd(params){
  return request({
    url:'/gather/add',
    method:'post',
    params:params
  })
}

//角色搜索
export function RowsApi(params){
  return request({
    url:'/sysRole/query',
    method:'post',
    params:params
  })
}
//角色删除
export function RowsDel(params){
  return request({
    url:'/sysRole/delete',
    method:'post',
    params:params
  })
}
//角色添加修改
export function RowsAdd(params){
  return request({
    url:'/sysRole/update',
    method:'post',
    params:params
  })
}
//用户查询
export const UerApi = (params)=>request.get('/sysUser/query',{params})
//用户新增
export function UserAdd(params){
  return request({
    url:'/sysUser/save',
    method:'post',
    params:params
  })
}
//用户修改
export function UserChange(params){
  return request({
    url:'/sysUser/update',
    method:'post',
    params:params
  })
}
//用户删除
export function UserDel(params){
  return request({
    url:'/sysUser/delete',
    method:'post',
    params:params
  })
}

// 新增时需要查询的终端信息
export const AddGatherApi = (params)=>request.get('/gather/addTerminal',{params})
// 挂接时查询的电表信息
export const GuaGatherApi = (params)=>request.get('/gather/ammeterList',{params})
// 采集信息挂接
export function GatherMount(params){
  return request({
    url:'/gather/mount',
    method:'post',
    params:params
  })
}
// 查询以挂接电表
export const GatherMountList = (params)=>request.get('/gather/mountList',{params})


//数据字典
export const Dict = (params)=>request.get('/sysDictData/getType',{params})

//首页信息电表
export const AssetsAmmeterCount = ()=>request.get('/assetsAmmeter/count')

//首页信息终端
export const AssetsTerminalCount = ()=>request.get('/assetsTerminal/count')

//首页信息客户
export const CustomerCount = ()=>request.get('/customer/count')
